import request from '@/router/axios';

export const getAdvertisePage = (params) => {
  return request({
    url: '/shop-base/base/banner/page',
    method: 'get',
    params,
  });
};

export const addAdvertise = (data) => {
  return request({
    url: '/shop-base/base/banner',
    method: 'post',
    data,
  });
};

export const getAdvertiseDetail = (id) => {
  return request({
    url: `/shop-base/base/banner/${id}`,
    method: 'get',
  });
};

export const editAdvertise = (id, data) => {
  return request({
    url: `/shop-base/base/banner/${id}`,
    method: 'put',
    data,
  });
};

export const disableAdvertise = (id, params) => {
  return request({
    url: `/shop-base/base/banner/disable/${id}`,
    method: 'put',
    params,
  });
};
